<?php

class RepeatAgentRelated extends CActiveRecordBehavior {
	public function beforeValidate($event) {
//		$owner = $this->owner;
//		$criteria = new CDbCriteria;
//		$criteria->compare('provider_id',$owner->provider_id);
//		$criteria->compare('dealer_id',$owner->dealer_id);
//		$model = new AgentRelated();
//		$count = $model->count($criteria);
//		if($count >= 1 ){
//			$event->isValid = false;
//			return $event->isValid;
//		}
	}
}

?>